package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.IndustryIdAndNameVO;
import com.lanchetech.bean.vo.IndustryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import com.lanchetech.entity.Industry;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface IndustryMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Industry record);

    int insertSelective(Industry record);

    Industry selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Industry record);

    int updateByPrimaryKey(Industry record);

    List<Industry> selectAllByType(@Param("type") Byte type);

    List<IndustryIdAndNameVO> selectNameAndIdByType(@Param("type") Byte type);

    List<IndustryIdAndNameVO> selectNameAndIdByPid(@Param("pid") Long pid);

    List<IndustryVO> findAllPage(PageReq req);

    List<Industry> findAllByIds(@Param("ids") List<Long> ids);

    int updateDeletedById(@Param("updatedDeleted") Byte updatedDeleted, @Param("id") Long id);

    List<Industry> selectAllIdByPid(@Param("pid") Long pid);

    int updateDeletedByIds(@Param("ids") List<Long> ids);

    List<IndustryIdAndNameVO> selectNameAndIdBySelectivePid(PageReq req);

    List<IndustryVO> findAll();


}